#ifndef MARSSPACE_H
#define MARSSPACE_H

#include <QDialog>

class QPushButton;
class QLabel;
class QLineEdit;
class QHBoxLayout;
class QVBoxLayout;

#define MarsSpaceIns MarsSpace::Instance()

class MarsSpace : public QDialog
{
    Q_OBJECT
public:
    MarsSpace();

    static MarsSpace *Instance();

public:
    void SetCurrentData(qreal space_left, qreal space_top, qreal space_right, qreal space_bottom);
    void ChangeCurrentData(qreal &space_left, qreal &space_top, qreal &space_right, qreal &space_bottom);

private:
    void initDialog();

private:
    QPushButton *btn_ok{nullptr};
    QPushButton *btn_cancle{nullptr};
    QLabel *label_left{nullptr};
    QLabel *label_top{nullptr};
    QLabel *label_right{nullptr};
    QLabel *label_bottom{nullptr};
    QLineEdit *lineedit_left{nullptr};
    QLineEdit *lineedit_top{nullptr};
    QLineEdit *lineedit_right{nullptr};
    QLineEdit *lineedit_bottom{nullptr};
    QHBoxLayout *h_layout_left{nullptr};
    QHBoxLayout *h_layout_top{nullptr};
    QHBoxLayout *h_layout_right{nullptr};
    QHBoxLayout *h_layout_bottom{nullptr};
    QHBoxLayout *h_layout_btn{nullptr};
    QVBoxLayout *v_layout{nullptr};
};

#endif // MARSSPACE_H
